angular
    .module("componentsModule", [])
    .component("sanSearch", {
        bindings: {
            searchFunc: "&"
        },
        controller: "sanSearchCtrl",
        controllerAs: "ssc",
        templateUrl: "../html/cmptSanSearch/cmptSanSearch.html"
    })
    .controller("sanSearchCtrl", function() {
        var
            _vm_ = this;

        _vm_.$onInit = $onInit;

        _vm_.search = search;

        function $onInit() {
            _vm_.searchVal = "";
        }

        function search() {
            _vm_.searchFunc({
                val: _vm_.searchVal
            });
        }
    })
    .component("typeList", {
        bindings: {
            title: "@",
            typeList: "<"
        },
        controller: ""
    })